
Equation for opamp sum/difference amps
Posted on June 2nd, 2013 No commentsWarning: this post contains maths
I can never find on the web or in my text books the general equations for opamps used as combined multiinput summing and difference amplifiers (ie they have several positive and negative inputs). It makes designing mixers for synthesizers annoyingly awkward as I have to rederive the equations each time. So, to save myself having to work everything out from scratch again, here are my derivations and notes on multiinput OpAmp circuits. I will also take the opportunity to point out some interesting parts of the results.
Main Results
So, here’s the setup:
We have an opamp circuit with “N” negative inputs and “M” positive inputs as shown above. All the positive and negative inputs are identical.
For an ideal opamp the output is:
Or, in other words the negative gain is:
The positive gain is:
Positive and negative gain
The negative gain is nice and easy and only depends on the input and feedback resistors and not on any other variables, like the number of inputs. Why is this? Well the inverting input of the opamp is a virtual ground and the voltage isn’t changed by the negative inputs. Therefore the current through each negative input only depends on its input voltage. You can have as many or as few negative inputs as you like and it works the same.
The positive inputs are not in this lucky position! Voltages at the positive inputs change the voltage at both the inverting and noninverting inputs of the opamp. The noninverting input voltage changes because of the voltage drop over Rg. The inverting input voltage changes due to the feedback action of the opamp keeping the input voltages ideally identical. This means that currents flowing through all the input branches depend on the positive input voltages and hence the complicated positive gain equation.
Limits on positive gain values
Once the negative gain is set, this configuration limits the range of values of the positive gain depending on the number of positive and negative inputs. One particular example:
If the negative gain G > 1 and number of negative inputs N < M, the number of positive inputs then G+ < G.To derive this then consider that the maximum positive gain is when the input resistors R+ = 0 (obvious from the circuit and also by inspection of the equation).
Special cases and derivation
There are several interesting special cases from these equations (including the basic opamp single input amplifiers) and the derivation is worth reading. So I don’t fill the blog with equations you can read it all in this pdf file.