Author Topic: Sum/Difference Op-Amp circuit drawbacks that no one mentions?  (Read 2338 times)

0 Members and 1 Guest are viewing this topic.

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
I'm looking into building an op-amp circuit that consists of summation op-amps and difference op-amps to get the sum/difference of voltages to result in a specific 'equation' of sorts (essentially, just a linear equation of adding/subtracting voltages at the end of it all); I was thinking about these kind of circuits, and I was wondering, aside from the typical op-amp considerations (input bias current, input bias voltage, bandwidth, GBW, etc.), when building these types of circuits, what kind of considerations do you have to keep in mind?

I've seen these circuits in books using the ideal op-amp model, but it doesn't really say much about the drawbacks of your choice of circuit. For instance, in the link below, one answer mentions how the non-inverting summing amp has issues that seem to make it impractical. Without knowing this, I'd probably run with it, so that's the stuff I'm trying to think about. Since my circuit can be boiled down to just inverting summation amps and difference amps, what are some things about them that should be taken into account in non-ideal scenarios (i.e., a limited number of inputs for performance, issues with floating nodes, etc.)?


https://electronics.stackexchange.com/questions/268547/inverting-summing-amplifier-vs-non-inverting-summing-amplfier
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7942
  • Country: us
  • Retired, now restoring antique test equipment
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #1 on: July 07, 2021, 04:27:40 pm »
Traditional analog computation used only inverting operational amplifiers.  At DC, with high DC gain, the voltage at the summing point is the main source of error.  Some of that is the static offset voltage (that can be trimmed) and very little of that (at DC) is the output voltage divided by the huge DC gain.  At higher frequencies, the gain falls off and the error voltage increases.  This is the basic analysis.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #2 on: July 07, 2021, 05:24:44 pm »
Input bias and offset are really important parameters and they get even more critical when the input resistor is 1Mohm.  Then toss in a 1 ufd capacitor in place of the feedback resistor and you have the beginnings of an analog computer.

The thing is, even a wee bit of input current times 1Mohm results in quite an error.

http://www.analogmuseum.org/english/homebrew/vogel/

Search for 'Vogel' on this page to get schematics and documentation  - in German but easy to work through
http://www.analogmuseum.org/english/library.html
There are 3 summers and 2 integrators plus a multiplier and some other features.

Use this page for the schematics.  The summer detail may be helpful in that it includes the offset trim pot.

http://www.analogmuseum.org/library/vogel_schaltplan.pdf



« Last Edit: July 07, 2021, 05:51:32 pm by rstofer »
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #3 on: July 07, 2021, 05:46:54 pm »
Thanks for the reply. With input offset voltage, that can be adjusted externally with a potentiometer [Link 1-Figure 5], or we could reduce the necessary input resistances to something smaller. In my equations, I'm ending up with no gain to the voltages, just adding them as is without gain, so as long as the resistors match, I can go with any value. Wouldn't that reduce the input offset voltage as well? In that sense, how can this be achieved when using a difference amplifier?


On that note, link 2 shows a breakdown of determining appropriate values of a difference amplifier with multiple inputs. One commenter noted that with summing amps, adding more inputs degrades both noise and bandwidth performance. With that in mind, though it would use up a lot more op-amps, is it more precise to focus on one or two inputs per op-amp to easily trim each offset voltage rather than to just have one op-amp with many inputs?



https://www.analog.com/media/en/training-seminars/tutorials/MT-037.pdf

https://www.electronicdesign.com/resources/ideas-for-design/article/21799355/efficiently-design-an-opamp-summer-circuit
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7942
  • Country: us
  • Retired, now restoring antique test equipment
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #4 on: July 07, 2021, 06:27:28 pm »
The input offset comes from two sources: 
(1)the input offset voltage (itself), defined as the small voltage you need to apply directly to the input to force the output to (or near) zero,
and (2) the input bias currents, which produce another voltage contribution, calculated from the current and the total resistance seen by the input. 
(Offset current is the difference between the two bias currents;  this is only relevant when you have matched the total resistance seen by each of the two inputs.) 
Reducing all the resistors will affect the current-induced contribution, but not the offset voltage itself.  (Offset adjustment pins affect the offset voltage directly.) 
When you consider resistor thermal noise, higher resistance values contribute more noise voltage to the circuit, especially since the input resistors are in series with the input voltage.  Also, the noise in the input bias currents (important for BJT input devices) produces a noise voltage that increases with higher resistance values.
At higher impedance values, such as in electrometer small-current transresistance amplifiers, higher resistors contribute less current noise to the the circuit.
The gain of the total circuit from the total input offset to the output is called the "noise gain", an important parameter for error calculations and bandwidth.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #5 on: July 07, 2021, 07:04:03 pm »
What kind of accuracy do you need?

Above I mentioned analog computing because it is clearly an example where adding, subtracting, multiplying and dividing are important.  Integration is even more important.  I'm not sure I would expect 1% accuracy.

I also mentioned bias current.  On the ComDyna GP6 computer, they use the LH0042CH op amp for the integrators because it has an input bias current of about 10 pA while for inverters they use a 741 op amp with about 80 nA of input bias current.

https://www.scss.tcd.ie/SCSSTreasuresCatalog/hardware/temp-Comdyna-GP6-Analog-Computer/Comdyna-GP6-Analog-Computer.htm

I'm guessing that you are planning to use +-15V supply do that your signal swing doesn't have to get too close to the rails.  On the GP6, and the Vogel project, signal swings are between +-10V max and they both use +-15V supplies.


 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #6 on: July 07, 2021, 07:14:12 pm »
I think I'm beginning to see it. In a nutshell, you got the following:

1. Input offset voltage (given by datasheet, can be reduced with offset pins, or with a pot at the inverting terminal if none are available)
2. Input bias current (creates a voltage offset via Ohm's Law, reduced by reducing resistor values)

Then you follow all this saying high resistor values increase the noise voltage, but contribute less current noise, so as R increases, you increase offset voltage caused by 1 source but reduce offset voltage by the other source. That's what I believe you are saying. So, please correct me if I'm totally misunderstanding.

The basic summing amp always tied the non-inverting input to ground. While #1 can be reduced with a pot, couldn't you reduce #2 by placing a bias current compensation resistor in series with the non-inverting terminal? Doing all this would reduce the output error, but working all this seems to bring the equations that I posted in an earlier link to mind: selecting a feedback resistor in a difference amp with multiple inputs.

This begs the question, how many op-amps are necessary? How do you reduce the number of op-amps down to a minimum value without sacrificing performance?
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #7 on: July 07, 2021, 07:18:56 pm »
What kind of accuracy do you need?

Above I mentioned analog computing because it is clearly an example where adding, subtracting, multiplying and dividing are important.  Integration is even more important.  I'm not sure I would expect 1% accuracy.

I also mentioned bias current.  On the ComDyna GP6 computer, they use the LH0042CH op amp for the integrators because it has an input bias current of about 10 pA while for inverters they use a 741 op amp with about 80 nA of input bias current.

https://www.scss.tcd.ie/SCSSTreasuresCatalog/hardware/temp-Comdyna-GP6-Analog-Computer/Comdyna-GP6-Analog-Computer.htm

I'm guessing that you are planning to use +-15V supply do that your signal swing doesn't have to get too close to the rails.  On the GP6, and the Vogel project, signal swings are between +-10V max and they both use +-15V supplies.

Thanks for replying. In terms of accuracy, I'm not sure yet. I'm just working out hypotheticals and trying to consider things that I'll need to take into consideration. At this point, I'm trying to see what voltages are available, so that limits my choice of op-amp. Right now, all I know is that my input signals go from 0 to -2 volts at a frequency of 100 MHz, lasting only for a few nanoseconds.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #8 on: July 07, 2021, 07:47:37 pm »
None of my replies have anything to do with such high speed operation.
I got your voltage swing and speed confused with a filter design over in Projects.
My bad...

Gain Bandwidth Product is going to be your most important parameter.
« Last Edit: July 07, 2021, 07:52:01 pm by rstofer »
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7942
  • Country: us
  • Retired, now restoring antique test equipment
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #9 on: July 07, 2021, 07:51:49 pm »
So long as you tie the non-inverting input to ground, it is simple to null the bias current by feeding the inverting input through a very large resistor from a suitable pot (from one or both supplies, as required).  For a sensitive ammeter (very high feedback resistor and no input resistor) back when JFET opamps were new, I installed a well-insulated mechanical relay with contacts to short the two inputs to zero the offset voltage with a pot connected to the offset adjust pins of the amplfier, then unshorted the inputs and adjusted the bias current with the other pot and large resistor.
Noise:  thermal (Johnson) noise can be considered as a voltage source (proportional to the square root of R), or a current source (inversely proportional to the square root of R), whichever is more convenient:  it's the same noise, don't double-count it.  The DC effects, of course, depend on the first power of the resistance.
One op-amp suffices, so long as you don't mind the polarity inversion from input to output.  The adjustment pots above do not increase the op-amp count.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7942
  • Country: us
  • Retired, now restoring antique test equipment
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #10 on: July 07, 2021, 07:53:18 pm »
I didn't see your frequency requirements.  You may find that the errors are dominated by resistor shunt capacitance and uncontrolled stray capacitance to ground, even with a good high-speed op-amp.
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #11 on: July 07, 2021, 08:19:34 pm »
I didn't see your frequency requirements.  You may find that the errors are dominated by resistor shunt capacitance and uncontrolled stray capacitance to ground, even with a good high-speed op-amp.

Sorry about that. I was thinking of just op-amps in general and didn't mention it until now. That's just parasitic considerations, right? Not much can be done about that aside from picking the right components and ensuring that the layout is well done.
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #12 on: July 07, 2021, 08:25:53 pm »
Sorry for not mentioning it sooner. I was thinking of op-amps in general, not taking into consideration the signal frequency.

Thanks for your tip about GBW. I'll have to keep that in mind, but doing a quick search, there's not a lot of choices.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7942
  • Country: us
  • Retired, now restoring antique test equipment
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #13 on: July 07, 2021, 10:01:33 pm »
Capacitance is positive definite, but there are tricks to cancel it by driving a "neutralization" capacitor from an inverted signal.
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #14 on: July 07, 2021, 10:13:45 pm »
None of my replies have anything to do with such high speed operation.
I got your voltage swing and speed confused with a filter design over in Projects.
My bad...

Gain Bandwidth Product is going to be your most important parameter.

What concerns me is the short time the signal has reaching its max value. It only stays at -2 volts for only a few nanoseconds before going back to 0, so I would need a very fast amplifier to catch such a signal.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7942
  • Country: us
  • Retired, now restoring antique test equipment
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #15 on: July 07, 2021, 10:16:38 pm »
GBW is used to calculate the open-loop gain at the frequency of interest.  The error referred to the op-amp input is the op-amp output divided by that gain (plus DC offset, of course).
However, large-signal behavior at high frequencies may depend more on slew rate, since the amplifier's output has a limited dV/dt.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #16 on: July 07, 2021, 11:20:22 pm »
None of my replies have anything to do with such high speed operation.
I got your voltage swing and speed confused with a filter design over in Projects.
My bad...

Gain Bandwidth Product is going to be your most important parameter.

What concerns me is the short time the signal has reaching its max value. It only stays at -2 volts for only a few nanoseconds before going back to 0, so I would need a very fast amplifier to catch such a signal.
It's way out of my league but I think you're looking for a video amplifier.
Here's a start with a 250 MHz op amp.  My suspicion is that it isn't nearly fast enough
https://www.maximintegrated.com/en/products/analog/amplifiers/MAX4102.html

You need to work out dV/dt and find a suitable op amp before you get very far down the path.  Perhaps you can find manufacturers with Parametric Search sites.

If you happen on Analog Devices as a source, you can use LTspice to accurately model your system
https://www.analog.com/en/parametric-search/amplifiers/operational-amplifiers.html#
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #17 on: July 08, 2021, 03:59:15 pm »
Thanks for your help and your suggestion. Unfortunately, the op-amp that you suggested can't be used due to my signal limits (ideal max output voltage is 8 volts), but your suggestion did give me an idea of how to proceed. Assuming the case of the maximum output voltage, I have to choose an op-amp that can satisfy such an output (thus, something higher than |5| volts), so that gave me a good place to start. Some of the op-amp models look promising when put into the simulation.
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #18 on: October 20, 2021, 07:37:04 pm »
I apologize for the reply, but recently, I've been revisiting the concept again, and I wanted to ask for some input/feedback on the two differences. I've attached an example circuit to try and showcase the two different summing op-amps. In my design, I have a 50-ohm terminating resistor at each input, so rather than have the input be floating when inactive, there's a path to ground.

So, the left one is the standard inverting summing op-amp. Pretty basic with a gain of -1. (In these examples, I just used 100-ohm resistors for illustration; it's not really indicative of actual values yet) Now, for the circuit on the right:

  • All current going into VP goes out through R13. R10 and R9 contribute nothing. So, at that node, VP = (IN1 +IN2) / 3, assuming R6, R11, and R13 are all the same.
  • For VN, it follows the basic formula: VOUT = (VN)*(1+{R8/R12}) where R8 is the feedback resistor.
  • Combining the two, VOUT = (1+{R8/R12})*({IN1 +IN2} / 3), where the gain is controlled by R8, R12, and the combination of R6, R11, and R13.

The notable issue faced on the question asked before was that the inputs could leave the non-inverting terminal floating. Plus, the possibility of crosstalk between the two inputs. However, is that not mitigated by the other added resistors? R10 and R9 allow for a short path to ground when there's no input signal. R13 gives a path for the signal to travel, which should prevent crosstalk from the signals. Plus, Node 4 can be any voltage, which would allow for offset voltage adjustment if necessary. While the standard non-inverting op-amp can't go below a gain of 1x, the addition of R13 in series with R6 and R11 could allow for lower values.

Does all this seem correct? The question I have now regarding this layout is with other factors such as bandwidth and noise. As it is, does this configuration affect the bandwidth or increase the noise somehow? Also, while I illustrate with two inputs, how would things change if I try to scale it to 4 inputs?


 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #19 on: October 20, 2021, 08:16:11 pm »
Input bias and offset are really important parameters and they get even more critical when the input resistor is 1Mohm.  Then toss in a 1 ufd capacitor in place of the feedback resistor and you have the beginnings of an analog computer.

The thing is, even a wee bit of input current times 1Mohm results in quite an error.

http://www.analogmuseum.org/english/homebrew/vogel/

Search for 'Vogel' on this page to get schematics and documentation  - in German but easy to work through
http://www.analogmuseum.org/english/library.html
There are 3 summers and 2 integrators plus a multiplier and some other features.

Use this page for the schematics.  The summer detail may be helpful in that it includes the offset trim pot.

http://www.analogmuseum.org/library/vogel_schaltplan.pdf

I built that Vogel analog computer and it works very well.  Photo of front panel attached.  I wanted the array of pin jacks to be 'perfect' so I built a CNC Mill to drill the holes.  Talk about scope creep!

I have since bought 2 Comdyna GP6 computers.  They tend to use 741 op amps.

https://www.scss.tcd.ie/SCSSTreasuresCatalog/hardware/temp-Comdyna-GP6-Analog-Computer/Comdyna-GP6-Analog-Computer.htm

In terms of analog computing, MATLAB Simulink has a lot of nice features.  Need another integrator?  No problem, just drag and drop one then wire it up.
« Last Edit: October 20, 2021, 08:40:34 pm by rstofer »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #20 on: October 20, 2021, 08:51:37 pm »
Does all this seem correct?

I'm not sure I understand the 50 Ohm resistors.  I don't think they do much unless you are using them to terminate a signal.

Were it me, I would jack up all of the other resistors by about x1000.  How much current can the op amp output?  Effectively, the output has to drive a 100 Ohm resistor to the current output voltage.  If that is 10V, the current will be 0.1A.  This is because the other end of the resistor is at virtual ground.  100k seems much more reasonable.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7942
  • Country: us
  • Retired, now restoring antique test equipment
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #21 on: October 20, 2021, 09:46:05 pm »
With the 100 ohm resistors to "virtual ground", the inputs will not present a 50 ohm termination to the sources, since the 100 ohm resistors are effectively in parallel with the 50 ohm resistors to "real ground".
The question of the op amp output supplying current to the feedback resistors is very important, and at high frequencies any parallel capacitance (for compensation or frequency response control) must be included in that calculation.
Regular op amps good for audio and DC were often specified to supply current into 2 k total load, with some good audio devices specified to drive 600 ohms.
At RF, be very careful about how much voltage you intend to drive into a 50 or 100 ohm total load resistance.
« Last Edit: October 20, 2021, 09:48:27 pm by TimFox »
 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #22 on: October 20, 2021, 10:09:47 pm »
Thanks for replying. Yeah, the 50-ohms are used to act as termination for the signals. Sorry, forgot to mention that. They're coming in from 50-ohm cables, so I had put them there for that reason.

For sure, 100-ohms is not the value I would use. It's just that I didn't really bother changing the values. This was just for illustration. I would use different values, if I can decide on what values to use. I'm not so sure of that yet. The thing is, one part of the gain is determined by R8 and R12. For the inputs, assuming all resistors are equal at the non-inverting terminal, you can pretty much use any resistor value you want (just that it cuts the gain formed by R8 and R12 accordingly). I'm not driving high current loads, just trying to sum up small signal voltages.

 

Online LoveLaikaTopic starter

  • Frequent Contributor
  • **
  • Posts: 561
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #23 on: October 20, 2021, 10:16:27 pm »
With the 100 ohm resistors to "virtual ground", the inputs will not present a 50 ohm termination to the sources, since the 100 ohm resistors are effectively in parallel with the 50 ohm resistors to "real ground".
The question of the op amp output supplying current to the feedback resistors is very important, and at high frequencies any parallel capacitance (for compensation or frequency response control) must be included in that calculation.
Regular op amps good for audio and DC were often specified to supply current into 2 k total load, with some good audio devices specified to drive 600 ohms.
At RF, be very careful about how much voltage you intend to drive into a 50 or 100 ohm total load resistance.

Thanks for responding. For sure, I'm not going to use 100-ohms. It's just a placeholder value to illustrate what I'm trying to do. With the issue of the op-amp output supplying current, that's mitigated by larger resistor values? I previously used feedback resistors of 2k-ohms as well as for the op-amp inputs, so perhaps it might be worth it to do so here with this configuration. How does the addition of a feedback capacitor feed into my equations? If it's just in parallel with the feedback resistor, the capacitor acts as a short at high frequencies (forming a low pass filter), so it just sets the cutoff frequency. That's all it is, right?

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Sum/Difference Op-Amp circuit drawbacks that no one mentions?
« Reply #24 on: October 20, 2021, 10:23:38 pm »
A really good book on op amps:  "Op Amps For Everyone"  Chapter 4 is my favorite because it shows me how to scale and offset the input voltage.  Like if I have a 12V SLA battery and I'm only interested in voltage between 10V and 15V and I want to offset the input to 0-5V (subtract off 10V) and rescale it to work with a 3.3V op amp or ADC.  Very handy chapter...

https://web.mit.edu/6.101/www/reference/op_amps_everyone.pdf

For your added inputs, you calculate each input resistor and the feedback resistor separately.  There's no reason you can't use 10k input and 10k feedback to get 1 to 1 ratio and then add another input with 5k to get a 2 times input.  Since the right hand end of the resistor is at virtual ground, the signals do not interact.  Use any ratios you like.  Breadboard the circuit and play with the input resistors.

Remember, it's all down to Kirchhoff's Current Law at the (-) input pin and the pin is at 0V (virtual).  So a bunch of currents come into the node and they all go out through the feedback resistor to get to the output pin.


« Last Edit: October 20, 2021, 10:27:13 pm by rstofer »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf