Author Topic: Simple Error Amplifier  (Read 12594 times)

0 Members and 1 Guest are viewing this topic.

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Simple Error Amplifier
« on: March 24, 2017, 07:18:23 pm »
Hi there,

As I understand it is hardly ever  a good idea to use an op-amp as a comparator, since there are much beter comparators available to complete such a task.

I intend on building a power supply at some point in the future, and was wondering specifically about the error amplifier. Most examples I came across, such as in the good old HP e3610 design, they seem to use an LF411 JFET op-amp to compare the measured voltage to a set voltage(which they achieve by changing the resistor divider  :o). For a dual rail setup, the output voltage should vary between 12V and -12V to turn on a driver transistor which drives the series pass transistor. They also have a resistor and capacitor from the inverting input to the output of the op-amp. I can only presume that this is for some form of frequency compensation or something, but I can't see how there will really be any frequency component when measuring the output voltage? Or am I missing something obvious?

Basically the question is, why use an op-amp as the error amplifier when a comparator is supposedly much faster?
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Simple Error Amplifier
« Reply #1 on: March 24, 2017, 07:24:47 pm »
Quote
Basically the question is, why use an op-amp as the error amplifier when a comparator is supposedly much faster?

 Because an op-amp will provide any linear output voltage from rail to rail to drive the output stage(s). A comparator only provides a digital output, either one rail voltage or the other. Different components aimed for different applications. An op-amp can be made a decent comparator with proper external components, but a comparator cannot replace a linear op-amp.



 

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Re: Simple Error Amplifier
« Reply #2 on: March 24, 2017, 07:43:41 pm »
Because an op-amp will provide any linear output voltage from rail to rail to drive the output stage(s). A comparator only provides a digital output, either one rail voltage or the other. Different components aimed for different applications. An op-amp can be made a decent comparator with proper external components, but a comparator cannot replace a linear op-amp.

Since its a closed loop, you would not need a linear output voltage if you have a driver that either turns the pass element on or off. This is assuming the loop is fast enough.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Simple Error Amplifier
« Reply #3 on: March 24, 2017, 08:16:42 pm »
Seems you are mixing linear regulators and switched regulators into one thing. They're not.
Linear regulators contain no switching elements and a comparator makes no sense.

 

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Re: Simple Error Amplifier
« Reply #4 on: March 24, 2017, 08:36:11 pm »
Maybe I didn't explain entirely, consider this the example circuit I was talking about. This comes directly from the old HP e3610 design with a modification not to adjust the voltage divider, but just the reference voltage and the substitution of the LF411 for the OP07.

Assume the measured voltage is 12 V, then if the set voltage is greater than 1.2 V, the output Vout is the saturated output of the op-amp, i.e 12 V. When the set voltage is less than 1.2V, the output of the op-amp saturates negatively, i.e. -12 V.

Vout is connected to their driving circuit which drives the pass element.

The point I'm trying to make is that, in that setup, the op-amp is essentially operating as a comparator. Why not use a much faster comparator instead?
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Simple Error Amplifier
« Reply #5 on: March 24, 2017, 08:54:50 pm »
Looks linear to me.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Simple Error Amplifier
« Reply #6 on: March 24, 2017, 09:22:58 pm »
Quote
The point I'm trying to make is that, in that setup, the op-amp is essentially operating as a comparator.

No, it's operating as an amplifier with an AC gain of ~1500, an integrator term and infinite DC gain. I'd say the 1.5M and cap are just for stability, total loop gain is set somewhere else not visible on your schematic.

« Last Edit: March 24, 2017, 09:27:21 pm by Benta »
 

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Re: Simple Error Amplifier
« Reply #7 on: March 24, 2017, 09:50:39 pm »

No, it's operating as an amplifier with an AC gain of ~1500, an integrator term and infinite DC gain. I'd say the 1.5M and cap are just for stability, total loop gain is set somewhere else not visible on your schematic.


I agree that it is in fact an integrator with infinite DC gain.There should not really be an AC component there(theoretically at least) which is why I said comparator.
Which is why I'm asking, because it seems to perform the same task if I swap out the op-amp for a comparator and remove the feedback part.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Simple Error Amplifier
« Reply #8 on: March 24, 2017, 10:07:37 pm »
Quote
it seems to perform the same task if I swap out the op-amp for a comparator and remove the feedback part.

Which begs the question: "what on earth are you trying to achieve?" An OP07 is not a cheap amp, and I'm sure it's in the design for a reason...
 
The following users thanked this post: 3db

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Simple Error Amplifier
« Reply #9 on: March 25, 2017, 12:26:07 am »
An op-amp can be made a decent comparator with proper external components, but a comparator cannot replace a linear op-amp.
Actually, with the correct compensation/filtering network, most comparator ICs can be used as op-amps.

There's even an example of the LM339 being used as an op-amp to make the integrator in a VCO.

http://www.ti.com/lit/ds/symlink/lm339-n.pdf

This isn't ideal but neither is using an op-amp IC as a comparator. If I were to build the circuit shown above, I'd probably use the LM393 and NE5532, for the comparators and op-amp, respectively.
 

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Re: Simple Error Amplifier
« Reply #10 on: March 25, 2017, 12:15:11 pm »

Which begs the question: "what on earth are you trying to achieve?" An OP07 is not a cheap amp, and I'm sure it's in the design for a reason...

The original schematic calls for a LF411 Low offset Low Drift op-amp. I simply chose the OP07 because it was something I had on hand and was easy enough to simulate quickly. The specific op-amp is not as relevant.

I'm just curious why use an op-amp which is not as suited for the task it is ultimately performing?
Thanks for all your advice so far! Much appreciated!
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Simple Error Amplifier
« Reply #11 on: March 25, 2017, 12:31:31 pm »
Quote
I'm just curious why use an op-amp which is not as suited for the task it is ultimately performing?

You're still not understanding the circuit. It is not operating as a comparator, it is operating as an amplifier in its linear region.

You need to include the rest of the circuit to fully see this.

 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Re: Simple Error Amplifier
« Reply #12 on: March 25, 2017, 12:39:17 pm »
...I'm just curious why use an op-amp which is not as suited for the task it is ultimately performing?
Thanks for all your advice so far! Much appreciated!

I know it's hard to imagine, but the error amplifier in a linear regulator really is operating in the linear region most of the time. This is because during steady state conditions the error-amp output will be at the voltage necessary to ensure the pass element delivers the desired output voltage. The extremely high DC gain (effectively the open-loop gain of the op-amp) ensures that the two inputs will be at nearly the same voltage during steady state operation.

It might help with your understanding if you lowered the DC gain of the error amp to, say, x10, and simulated it in LTSpice or the like. Note how the performance of the regulator changes, both in the steady state output voltage error and in response to abrupt changes in load (both small and large changes).

 

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Re: Simple Error Amplifier
« Reply #13 on: March 25, 2017, 02:04:35 pm »
The circuit below illustrates the loop for constant voltage.

The LT1037 is much faster/more accurate than the OP07 according to simulation, and thus was used instead.
If the op-amp is replaced with a comparator, such as the LT1018 for example, and the feedback capacitor removed, the output is exactly the same (even for node Vea), hence the question.

 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Simple Error Amplifier
« Reply #14 on: March 25, 2017, 03:35:36 pm »
Quote
the output is exactly the same

I'm not surprised. As you've drawn it, the opamp is not doing anything, your regulator is open loop.
I see a 100/900 kohm combination at the output. Shouldn't that go to the opamp?
 

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Re: Simple Error Amplifier
« Reply #15 on: March 25, 2017, 04:38:49 pm »
your regulator is open loop.
Not sure I understand, since the final output is fed to the op-amp through the 20k/2k combination?
Quote
I see a 100/900 kohm combination at the output. Shouldn't that go to the opamp?

This was only intended to be used for later measurement, i.e. something that can be sent to an ADC or something.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Simple Error Amplifier
« Reply #16 on: March 25, 2017, 04:52:26 pm »
Vset seems to be a voltage reference with no relation to the output.

 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Simple Error Amplifier
« Reply #17 on: March 25, 2017, 04:57:23 pm »
You're feeding the non-inverting input with a "FIXED" voltage.

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14073
  • Country: de
Re: Simple Error Amplifier
« Reply #18 on: March 25, 2017, 05:03:18 pm »
There is feedback through R4 and R5. V_set is relative to the output. The circuit with GND at the positive output can be a little confusing.

Still the error amplifier works in linear mode so usually with something like 1 V at the output. So it absolutely makes sense to use an OP and not a comparator.

For a comparator linear operation might work in some cases, but is usually not guarantied. Also the LT1037 might be a problem, as this OP is not unity gain stable - this can be a problem in some cases.

With the compensation circuit as shown, the choice of OP could be important as the GBW of the OP might set the loop speed in the critical frequency range. So a faster or not unity gain stable OP might need a modified compensation.

For stability of the loop also parasitic properties like the ESR of C2 and inductance of the 0.1 Ohms resistor can play a role. Usually it is a good idea to have a combination of low ESR and high ESR capacitance for C2.
 

Offline eujeanTopic starter

  • Contributor
  • Posts: 17
  • Country: za
Re: Simple Error Amplifier
« Reply #19 on: March 25, 2017, 05:17:12 pm »
The circuit with GND at the positive output can be a little confusing.

Yes I must apologize for this. I did it this way to relate to the original e3610 schematic.

Quote
Still the error amplifier works in linear mode so usually with something like 1 V at the output. So it absolutely makes sense to use an OP and not a comparator.

For a comparator linear operation might work in some cases, but is usually not guarantied. Also the LT1037 might be a problem, as this OP is not unity gain stable - this can be a problem in some cases.

With the compensation circuit as shown, the choice of OP could be important as the GBW of the OP might set the loop speed in the critical frequency range. So a faster or not unity gain stable OP might need a modified compensation.

This makes sense as Benta mentioned as well that the amplifier is operating in linear mode. With some more simulation, the comparator seemed to oscillate even though it did seem to make the loop a bit faster prior to oscillation.

Does this mean that the compensation circuit is of much more importance than the OP? How would one go about deciding what to trade off?
« Last Edit: March 25, 2017, 05:21:50 pm by eujean »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14073
  • Country: de
Re: Simple Error Amplifier
« Reply #20 on: March 25, 2017, 05:53:10 pm »
Usually the compensation circuit is more important than the OP. If the OP is fast enough it is the external circuit that sets the speed and not the OP anymore. The shown circuit is a little unusual in this respect.

Usually an OP with something like 1-3 MHz GBW is considered fast enough. In some circuits even the slow OP07 or LM358 might be fast enough.  The feedback divider also has an influence on how fast the OP needs to be. Quite some circuit have more feedback for the AC part and this way can operate with an OP that is slower.

The more important parameters for the choice of OP can be noise, DC drift and in some high impedance circuits also input bias. For a simple lab supply something like an TL07x / LF411 / RC4558 can be good enough. If one wants a really fast regulating supply it needs fast output transistors and care with the parasitic properties - using as faster OP alone does not help. Looking at parasitic inductance in the 10's of nH range is what makes this difficult. Another point to consider is that transistors / MOSFETs get slower at low current and thus 2 quadrant operation might be a good idea if a high speed is needed.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Simple Error Amplifier
« Reply #21 on: March 25, 2017, 06:04:23 pm »
The compensation of the opamp has values that are so large, that you can be certain that it is compensating the whole loop, not just the opamp.

Hint for readable schematics: always draw siganls as signals. Do not rely on implication through a couple of ground symbols.

 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: Simple Error Amplifier
« Reply #22 on: March 25, 2017, 08:48:29 pm »
Some op-amps configured with high gain will function pretty fine as a comparator (in slow applications), selection will depend on a few factors not limited to.
 
* Speed
* Slew Rate
* High noise as a result of gain feedback path at the summing points.
* Cost

 

Offline Lee Leduc

  • Regular Contributor
  • *
  • Posts: 84
  • Country: us
Re: Simple Error Amplifier
« Reply #23 on: March 25, 2017, 11:26:50 pm »
Here's an Analog Devices app note AN-849 discussing the pros and cons of using opamps as comparators.
 

Offline Efe_114

  • Contributor
  • Posts: 46
  • Country: tr
Re: Simple Error Amplifier
« Reply #24 on: December 23, 2018, 07:41:44 pm »
Sorry for replying to this old topic but i wanted to clear the fog about E3610a schematics
full schematic at the attachment.
Test gear: Aneng8009, 30V 5A chinese PSU( 1.5V peak-peak noise)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf